In a database environment that enables access by software applications to data in a database, when a query is made by a client (e.g., an application server) to retrieve data, a result set (e.g., ResultSet) cache can be created on the client side, and the returned data stored in a byte array, together with accessor prototypes and statement metadata. However, since a byte array can be quite large, caching such a structure can cause memory pressure on the client's database driver, and reduce the client's ability to cache additional data. Additionally, the size of the result set cache must be constantly calculated, for status reporting to the database server and for managing the result set size cache within limits. Each such calculation may require a trip to the server to determine the number of bytes in the byte array, which is a cumbersome and resource-expensive operation.